<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>getConfigVars()</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Smarty 3 Manual">
<link rel="up" href="api.functions.html" title="Chapter 14. Smarty Class Methods">
<link rel="prev" href="api.get.config.dir.html" title="getConfigDir()">
<link rel="next" href="api.get.plugins.dir.html" title="getPluginsDir()">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">getConfigVars()</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="api.get.config.dir.html">Prev</a> </td>
<th width="60%" align="center">Chapter 14. Smarty Class Methods</th>
<td width="20%" align="right"> <a accesskey="n" href="api.get.plugins.dir.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="refentry" title="getConfigVars()">
<a name="api.get.config.vars"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2>Name</h2>
<p>getConfigVars() — returns the given loaded config variable value</p>
</div>
<div class="refsect1" title="Description">
<a name="id433881"></a><h2>Description</h2>
<code class="methodsynopsis"><span class="type">array </span><span class="methodname">getConfigVars</span>(<span class="methodparam"><span class="type">string </span><span class="parameter">varname</span></span>);</code><p>
   If no parameter is given, an array of all loaded
   <a class="link" href="language.config.variables.html" title="Variables loaded from config files">config variables</a>
   is returned.
  </p>
<div class="example">
<a name="id434300"></a><p class="title"><b>Example 14.26. getConfigVars()</b></p>
<div class="example-contents"><pre class="programlisting">

&lt;?php

// get loaded config template var #foo#
$myVar = $smarty-&gt;getConfigVars('foo');

// get all loaded config template vars
$all_config_vars = $smarty-&gt;getConfigVars();

// take a look at them
print_r($all_config_vars);
?&gt;

   </pre></div>
</div>
<br class="example-break"><p>
   See also
  <a class="link" href="api.clear.config.html" title="clearConfig()"><code class="varname">clearConfig()</code></a>,
   <a class="link" href="language.function.config.load.html" title="{config_load}"><code class="varname">{config_load}</code></a>,
  <a class="link" href="api.config.load.html" title="configLoad()"><code class="varname">configLoad()</code></a>
   and
  <a class="link" href="api.get.template.vars.html" title="getTemplateVars()"><code class="varname">getTemplateVars()</code></a>.
  </p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="api.get.config.dir.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="api.functions.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="api.get.plugins.dir.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">getConfigDir() </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> getPluginsDir()</td>
</tr>
</table>
</div>
</body>
</html>
